package com.ruoyi.web.mapper;

import com.ruoyi.web.domain.WithdrawalRecord;
import com.ruoyi.web.dto.WithdrawalRecordDTO;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 提现记录Mapper接口
 *
 * @author ruoyi
 * @date 2023-01-05
 */
@Component
public interface WithdrawalRecordMapper {

    WithdrawalRecord selectOne(WithdrawalRecord record);

    /**
     * 查询提现记录
     *
     * @param id 提现记录主键
     * @return 提现记录
     */
    public WithdrawalRecord selectWithdrawalRecordById(Long id);

    /**
     * 查询提现记录列表
     *
     * @param withdrawalRecord 提现记录
     * @return 提现记录集合
     */
    public List<WithdrawalRecord> selectWithdrawalRecordList(WithdrawalRecord withdrawalRecord);

    /**
     * 查询提现记录列表
     *
     * @param withdrawalRecord 提现记录
     * @return 提现记录集合
     */
    public List<WithdrawalRecord> selectChildWithdrawalRecordList(WithdrawalRecordDTO withdrawalRecord);

    /**
     * 新增提现记录
     *
     * @param withdrawalRecord 提现记录
     * @return 结果
     */
    public int insertWithdrawalRecord(WithdrawalRecord withdrawalRecord);

    /**
     * 修改提现记录
     *
     * @param withdrawalRecord 提现记录
     * @return 结果
     */
    public int updateWithdrawalRecord(WithdrawalRecord withdrawalRecord);

    /**
     * 删除提现记录
     *
     * @param id 提现记录主键
     * @return 结果
     */
    public int deleteWithdrawalRecordById(Long id);

    /**
     * 批量删除提现记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWithdrawalRecordByIds(Long[] ids);

    /**
     * 拒绝
     *
     * @param id id
     * @return {@link int}
     * @since 2023/4/1 19:35
     */
    int reject(Long id);
}
